﻿package mortal.game.view.ranking.view
{
    import com.mui.containers.globalVariable.*;
    import com.mui.controls.*;
    import com.mui.utils.*;
    import fl.controls.*;
    import fl.data.*;
    import mortal.component.GCatogeryList.*;
    import mortal.game.view.ranking.renderer.*;
    import mortal.game.view.ranking.util.*;

    public class RankingCategorySpr extends GSprite
    {
        private var _categoryList:GCatogeryList;

        public function RankingCategorySpr()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._categoryList = UICompomentPool.getUICompoment(GCatogeryList);
            this._categoryList.setListSize(186, 439);
            this._categoryList.x = 0;
            this._categoryList.y = 0;
            this._categoryList.tileList.direction = GBoxDirection.VERTICAL;
            this._categoryList.tileList.columnWidth = 173;
            this._categoryList.tileList.columnCount = 1;
            this._categoryList.headGap = 5;
            this._categoryList.tileList.verticalScrollPolicy = ScrollPolicy.ON;
            this._categoryList.scrollPane.verticalScrollPolicy = ScrollPolicy.OFF;
            this.addChild(this._categoryList);
            this.initListData();
            return;
        }// end function

        private function initListData() : void
        {
            var _loc_1:* = RankingUtil.getCategoryHeadData();
            this._categoryList.createHeads(RankingCategoryHead, _loc_1, 163, 44);
            this._categoryList.setCellRender(0, RankingCategoryRenderer, true);
            this._categoryList.setCellHeight(0, 44, true);
            this._categoryList.setListSize(164 + 12, 526);
            this._categoryList.setItemListSize(163 + 12, 84 - 8, 163 - 8, 23);
            this._categoryList.headGapOnExpand = 1;
            var _loc_2:int = 0;
            while (_loc_2 < (_loc_1.length - 1))
            {
                
                this._categoryList.setDataProvider(_loc_2, new DataProvider());
                _loc_2++;
            }
            this._categoryList.setDataProvider((_loc_1.length - 1), RankingUtil.otherRankData);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._categoryList.dispose(param1);
            this._categoryList = null;
            return;
        }// end function

    }
}
